package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;

/**
 * 
 * @TableName prescription_detail
 */
@TableName(value ="prescription_detail")
public class PrescriptionDetail {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * prescription ID
     */
    @TableField(value = "prescription_id")
    private Integer prescriptionId;

    /**
     * Drug ID
     */
    @TableField(value = "drug_id")
    private Integer drugId;

    /**
     * Usage method
     */
    @TableField(value = "usage")
    private String usage;

    /**
     * Dosage
     */
    @TableField(value = "dosage")
    private String dosage;

    /**
     * Frequency
     */
    @TableField(value = "frequency")
    private String frequency;

    /**
     * Quantity
     */
    @TableField(value = "quantity")
    private BigDecimal quantity;

    /**
     * Status
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * prescription ID
     */
    public Integer getPrescriptionId() {
        return prescriptionId;
    }

    /**
     * prescription ID
     */
    public void setPrescriptionId(Integer prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    /**
     * Drug ID
     */
    public Integer getDrugId() {
        return drugId;
    }

    /**
     * Drug ID
     */
    public void setDrugId(Integer drugId) {
        this.drugId = drugId;
    }

    /**
     * Usage method
     */
    public String getUsage() {
        return usage;
    }

    /**
     * Usage method
     */
    public void setUsage(String usage) {
        this.usage = usage;
    }

    /**
     * Dosage
     */
    public String getDosage() {
        return dosage;
    }

    /**
     * Dosage
     */
    public void setDosage(String dosage) {
        this.dosage = dosage;
    }

    /**
     * Frequency
     */
    public String getFrequency() {
        return frequency;
    }

    /**
     * Frequency
     */
    public void setFrequency(String frequency) {
        this.frequency = frequency;
    }

    /**
     * Quantity
     */
    public BigDecimal getQuantity() {
        return quantity;
    }

    /**
     * Quantity
     */
    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    /**
     * Status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * Status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PrescriptionDetail other = (PrescriptionDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPrescriptionId() == null ? other.getPrescriptionId() == null : this.getPrescriptionId().equals(other.getPrescriptionId()))
            && (this.getDrugId() == null ? other.getDrugId() == null : this.getDrugId().equals(other.getDrugId()))
            && (this.getUsage() == null ? other.getUsage() == null : this.getUsage().equals(other.getUsage()))
            && (this.getDosage() == null ? other.getDosage() == null : this.getDosage().equals(other.getDosage()))
            && (this.getFrequency() == null ? other.getFrequency() == null : this.getFrequency().equals(other.getFrequency()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPrescriptionId() == null) ? 0 : getPrescriptionId().hashCode());
        result = prime * result + ((getDrugId() == null) ? 0 : getDrugId().hashCode());
        result = prime * result + ((getUsage() == null) ? 0 : getUsage().hashCode());
        result = prime * result + ((getDosage() == null) ? 0 : getDosage().hashCode());
        result = prime * result + ((getFrequency() == null) ? 0 : getFrequency().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", prescriptionId=").append(prescriptionId);
        sb.append(", drugId=").append(drugId);
        sb.append(", usage=").append(usage);
        sb.append(", dosage=").append(dosage);
        sb.append(", frequency=").append(frequency);
        sb.append(", quantity=").append(quantity);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }
}